//
//  NSObject+AviodCrash.h
//  LzlPictureBrower
//
//  Created by luozhilin on 2018/6/5.
//  Copyright © 2018年 luozhilin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

@interface NSObject (AviodCrash)
// 避免崩溃  ifDealWithNoneSel 是否对没有实现的方法进行消息转发
+ (void)avoidCrashExchangeMethodIfDealWithNoneSel:(BOOL)ifDealWithNoneSel;
// classArray 防止崩溃的类数组
+ (void)setupNoSelClassAvoidCrashWithClassNameArray:(NSArray <NSString *>*)classArray;
// classArray 防止崩溃的类前缀集合数组
+ (void)setupNoSelClassAvoidCrashWithPrefixClassNameArray:(NSArray <NSString *> *)prefixClassArray;

/**
 *  Can avoid crash method
 *
 *  1.- (void)setValue:(id)value forKey:(NSString *)key
 *  2.- (void)setValue:(id)value forKeyPath:(NSString *)keyPath
 *  3.- (void)setValue:(id)value forUndefinedKey:(NSString *)key //这个方法一般用来重写，不会主动调用
 *  4.- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues
 *  5. unrecognized selector sent to instance
 */
@end
